import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

//vuex持久化
import VuexPersist from "vuex-persist"

//实例化对象
const vuexLocal = new VuexPersist({
    storage: window.sessionStorage
})


export default new Vuex.Store({
  state: {
    users:{},
  },
  mutations: {
    login(state,data){
      console.log('调用数据');
      state.users = data;
    }
  },
  actions: {

  },
  plugins: [vuexLocal.plugin],
})
